<template>
  <el-checkbox-group
      v-bind="inputInfo.inputAttrs"
      v-model="value"
      @change="$emit('update:modelValue', $event)">
    <el-checkbox
      v-bind="inputInfo.subAttrs"
      v-for="(label, index) in inputInfo.checkList"
      :key="index"
      :label="label"
    />
  </el-checkbox-group>
</template>

<script>
import { defineComponent, reactive } from "vue";

export default defineComponent({
  name: 'CommonCheckbox',
  props: {
    inputInfo: {
      type: Object,
      default: {}
    }
  },
  setup(props) {
    return {
      value: reactive(props.inputInfo.value)
    }
  }
})
</script>

<style>

</style>